]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Toggle mutter's unredirect features on/off depending on the situation
authorAdel Gadllah <adel.gadllah@gmail.com>
Mon, 29 Aug 2011 21:55:42 +0000 (23:55 +0200)
committerAdel Gadllah <adel.gadllah@gmail.com>
Mon, 29 Aug 2011 22:15:52 +0000 (00:15 +0200)
We disable it when in the overview or when recording a video and otherwise
leave it enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=618497

js/ui/main.js
js/ui/overview.js

index 2b50de47117bd6ad36cf7a877f18e8bcd7354ece..17a0488975747e442374b4d3d69d39f9fe4a2681 100644 (file)
@@ -108,6 +108,7 @@ function _initRecorder() {
 
         if (recorder.is_recording()) {
             recorder.pause();
+            Meta.enable_unredirect_for_screen(global.screen);
         } else {
             // read the parameters from GSettings always in case they have changed
             recorder.set_framerate(recorderSettings.get_int('framerate'));
@@ -119,6 +120,7 @@ function _initRecorder() {
             else
                 recorder.set_pipeline(null);
 
+            Meta.disable_unredirect_for_screen(global.screen);
             recorder.record();
         }
     });
index 9555a710e89fcb2b9f60f943ce992fb1797751ac..bb050e3b7ca639dee452f922971eb04b862014e5 100644 (file)
@@ -574,6 +574,9 @@ Overview.prototype = {
         //
         // If we switched to displaying the actors in the Overview rather than
         // clones of them, this would obviously no longer be necessary.
+        //
+        // Disable unredirection while in the overview
+        Meta.disable_unredirect_for_screen(global.screen);
         global.window_group.hide();
         this._group.show();
         this._background.show();
@@ -767,6 +770,9 @@ Overview.prototype = {
     },
 
     _hideDone: function() {
+        // Re-enable unredirection
+        Meta.enable_unredirect_for_screen(global.screen);
+
         global.window_group.show();
 
         this.workspaces.destroy();